<div class="title">
	<span>Edit Time</span>
	<span class="clear">&nbsp;</span>
</div>

<div class="margin">
<?php flash(); //display flash data ?>

<?php echo form_open('admin/edit_time/'.$time_id); ?>

<div class="input-block">
	<label>Time Start</label>
	<select name="aps_time_from">
	
		<?php for($i = 1; $i <= 24; $i++):?>
		
			<?php $selected = (date('G:i:s', strtotime($time->aps_time_from)) == date("G:i:s", mktime($i, 0, 0, 0, 0, 0))) ? 'selected="selected"' : ''; ?>
			
			<option value="<?php echo date("G:i:s", mktime($i, 0, 0, 0, 0, 0)); ?>" <?php echo $selected;?>><?php echo date("g:i A", mktime($i, 0, 0, 0, 0, 0)); ?></option>
			
		<?php endfor;?>
		
	</select>
</div>

<div class="input-block">
	<label>Time Start</label>
	<select name="aps_time_to">
	
		<?php for($i = 1; $i <= 24; $i++):?>
		
		<?php $selected = (date('G:i:s', strtotime($time->aps_time_to)) == date("G:i:s", mktime($i, 0, 0, 0, 0, 0))) ? 'selected="selected"' : ''; ?>
		
			<option value="<?php echo date("G:i:s", mktime($i, 0, 0, 0, 0, 0)); ?>" <?php echo $selected;?>><?php echo date("g:i A", mktime($i, 0, 0, 0, 0, 0)); ?></option>
			
		<?php endfor;?>
		
	</select>
</div>

<?php echo form_submit(array('name' => 'edit_time', 'value' => 'Save', 'class' => 'fbtn add'));?>
<?php echo form_close();?>

<a href="<?php echo site_url('admin/time_table/')?>" class="back-btn"><span>Back</span></a>
</div>